package com.sandbox.ws;

import java.util.List;
import java.util.concurrent.BlockingQueue;

import org.springframework.batch.item.ItemWriter;
import com.edb.finance.collateral.wsdomain.collateralitem.v1.Collateralitem;
import com.evry.finance.collateral.wsdomain.Database;

/**
 * This class does practically nothing. But a writer might be required. 
 * @author eu2445
 *
 */
public class QueueWriter implements ItemWriter<Database> {

	private BlockingQueue<Collateralitem> queue;
	
	public void setQueue(BlockingQueue<Collateralitem> queue) {
		this.queue = queue;
	}

//	public void write(Database items) throws Exception {
//		for (items.getCollateralItem())
//		queue.addAll(items);
//		System.out.println("QueueWriter (Thread #" + Thread.currentThread() + ") size of list " + queue.size() + " remaining space: " + queue.remainingCapacity());
//	}

	public void write(List<? extends Database> items) throws Exception {
		// TODO Auto-generated method stub
		
	}
}